package com.l.shirodemo.service.impl;

import com.l.shirodemo.mapper.LoginMapper;
import com.l.shirodemo.pojo.Login;
import com.l.shirodemo.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {

    @Autowired
    private LoginMapper loginMapper;

    @Override
    public Login findByName(String username) {
        return loginMapper.selectByName(username);
    }

    @Override
    public int add(Login login) {
        return loginMapper.insert(login);
    }
}
